package com.aegis.manage.utils;

import org.yaml.snakeyaml.Yaml;

import java.util.Map;

/**
 * @Author wuweixin
 * @Version 1.0
 * @Descritube
 */
public class YamlUtil {

    public static Map<String, Object> parseYamlToMap(String yamlStr) {
        Yaml yaml = new Yaml();
        return yaml.load(yamlStr);
    }

    public static String convertMapToYaml(Map<String, Object> configMap) {
        Yaml yaml = new Yaml();
        return yaml.dump(configMap);
    }

}
